package com.wj.ch2.profile;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @program: wj_springBoot
 * @description: 载入配置文件
 * @author: wj
 * @create: 2021-10-08 11:09
 **/
@Configuration
public class ProfileConfig {

    @Bean
    @Profile("dev")
    public DeamBean devDeamBean(){
        return new DeamBean("from developmeng profile");
    }

    @Bean
    @Profile("prod")
    public DeamBean prodDeamBean(){
        return new DeamBean("from production profile");
    }
}
